---@module config
module(..., package.seeall)

RUN_DEV = "prod" -- local本机电脑调试 dev--开发环境 uat-- prod 正式环境

MQTT_HOST = "iot-device.wens.com.cn"
MQTT_PORT = "1883"
MQTTS_PORT = "8883"
IS_MQTT_SSL = false -- 是否使用加密方式连接mqtt

-- Linkta http接口密钥
ACCESS_ID = "d5w3TaOW6fgyvq0K65sdx7yz"
ACCESS_SECRET = "obdHxAt7mMktrATizeOIEtq2BV3IpR"

ALI_INSTANCEID = "iot-040a0a0k"
ALI_PRODUCTKEY = "gqicmrQKrCc"
ALI_PRODUCTSECRET = "3fGgpWgXBdlbUbhX"
ALI_REGION = "cn-shenzhen"


CQ_URL = "https://cq.wens.com.cn"
ISW5500 = nvm.get("w5500Used")
if ISW5500 == true then
    CQ_URL = "http://cq-prod.gzwmkj.net" -- 不能用https 用自建服务器转发
end

if RUN_DEV == "dev" then
    -- CQ_URL = "https://test-api.wens.com.cn/cqiot/cq/ierp" --通过api平台转发
    CQ_URL = "http://cq-test.gzwmkj.net/cqiot/cq/ierp" -- 通过api平台转发
elseif RUN_DEV == "uat" then
    CQ_URL = "https://t-mall.wens.com.cn/ierp"
end
-- 外部自建服务
BASE_URL = "http://8.134.14.70:8931/easy/a/"

-- 苍穹相关接口
-- 开机自注册
IOT_BOOT_URL = CQ_URL .. "/kapi/app/wens_iot_link/IotDevBootstrap/invoke"
-- luat 升级的地址
UPDATE_URL = CQ_URL .. "/wens/auth/smartb/luat/getBinLuat724.do"

-- 业务相关
-- 上下料上报
POSTEVENT_URL = CQ_URL ..
                    "/kapi/app/wens_bulk_feed_manage/BulkFeedEventPushApi/invoke"
-- 每天上报
DAYREPORT_URL = CQ_URL ..
                    "/kapi/app/wens_bulk_feed_manage/BulkFeedDayInfo/invoke"

-- 断电报警,设备日志等事件 post地址
POSTLOG_URL = BASE_URL .. "/luatext/common/api/log/sendLog"

-- 料塔型号列表
DEV_TYPE_LIST = {
    {name = "托利多", type = "TLD", baud = 9600},
    {name = "筠城IOT", type = "JCIOT", baud = 9600},
    {name = "南牧", type = "NM", baud = 2400},
    {name = "托利多2", type = "TLD2", baud = 9600},
    {name = "英孚克斯", type = "YFKS", baud = 9600},
    {name = "世感", type = "FGSG", baud = 9600},
    {name = "耀华", type = "SHYH", baud = 9600},
    {name = "耀华C8", type = "SHYHC8", baud = 9600},
    {name = "XK3168", type = "XK3168", baud = 9600},
    {name = "XK3101", type = "XK3101", baud = 4800},
    {name = "TCP-W", type = "TCPW", baud = 9600},
    {name = "狄纳乔", type = "DNQ", baud = 9600}
}
